home *** CD-ROM | disk | FTP | other *** search
- /*
- File: SimpleApp_Sound.h
-
- Contains: Header for SimpleQT functions using SimpleApp framework.
-
- Written by: Mark Cookson
-
- Copyright: Copyright © 1996-1999 by Apple Computer, Inc., All Rights Reserved.
-
- You may incorporate this Apple sample source code into your program(s) without
- restriction. This Apple sample source code has been provided "AS IS" and the
- responsibility for its operation is yours. You are not permitted to redistribute
- this Apple sample source code as "Apple sample source code" after having made
- changes. If you're going to re-distribute the source, we require that you make
- it clear in the source that the code was descended from Apple sample source
- code, but that you've made changes.
-
- Change History (most recent first):
- 8/31/1999 Karl Groethe Updated for Metrowerks Codewarror Pro 2.1
-
-
- */
-
- #include <Windows.h>
-
- #include "SAL_Public.h"
- #include "DBFF.h"
-
- #define oneBuffer (1)
- #define tenBuffers (10)
- #define soundPlaying (!ASoundIsDone (mySoundInfo) && !paused)
- #define qtStyle 0
- #define cdStyle 1
- #define kScrollMinValue 1
-
- /* Globals */
- ControlHandle startButton = nil,
- stopButton = nil,
- resumeButton = nil,
- scrollBar = nil,
- checkBox = nil;
- Boolean CDStyle = false, /* false means QuickTime style scrolling */
- gPlayBackwards = false, /* should we play backwards? */
- paused = false, /* are we currently paused? */
- stopped = false, /* are we currently stopped? */
- gDone = false;
- SoundInfoPtr mySoundInfo = nil;
- GrafPtr gTheWindow = nil;
- Str255 gOldWindowTitle;
-
- /* Function declarations */
- extern pascal void DoScroll (ControlHandle control, short part);
- extern pascal void MyScrollAction (ControlHandle control, short part);
- extern pascal OSErr DoPlay (const ButtonItemRef pButtonItemRef,const long modifiers);
- extern pascal OSErr DoPause(const ButtonItemRef pButtonItemRef,const long modifiers);
- void MyIdleProc (EventRecord *evt);
- extern pascal OSErr DoStop(const ButtonItemRef pButtonItemRef,const long modifiers);
- extern pascal short DoPostGroupHit (long modifiers,
- ControlRef theControl,
- ButtonItemRef brh,
- short item);
- pascal short DoPlayBackwards(const ButtonItemRef pButtonItemRef,const long modifiers);
- void main (void);
- void EnableControl (ControlRef cr);
- void DisableControl (ControlRef cr);
-